package com.hwy.struts.actions;

import java.util.Date;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;
// Struts2的数据封装, 在Action中使用set方式进行赋值
public class DataAction extends ActionSupport {
	private String username;
	private Date birthday;
	public String get() {
		HttpServletRequest request = ServletActionContext.getRequest();
		System.out.println(this.username);
		System.out.println(this.birthday);
		return NONE;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
}
